package com.uzhie.exception;

import com.uzhie.web.bean.ErrorBean;

/**
 * Created by lilongfei on 2018/7/24.
 */
public class WarningException extends BussException {
    private int status = -1;
    private String message;

    public WarningException(String error) {
        this(0, error);
    }

    public WarningException(int status, String error) {
        super(error);
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public ErrorBean getError() {
        ErrorBean error = new ErrorBean();
        error.setCode(status);
        error.setMsg(getMessage());
        return error;
    }

    public class Status {
        public final static String ID_ISNULL = "告警ID不可为空";
        public final static String SIM_ERROR = "sim卡号为空";
        public final static String ORDER_ERROR = "jt200命令不可以为空";
        public final static String DRIVER_ERROR = "驾驶员姓名不可以为空";
        public final static String CATEGORY_ERROR = "告警类别不可以为空";
        public final static String DEPART_ERROR = "部门不可以为空";

        public final static String WARN_ERROR = "告警对象不可以为空";
        public final static String STATUS_ERROR = "告警状态异常,不可处理";
        public final static String HANLD_ERROR = "处理状态异常,不可处理";
        public final static String CHANNEL_ISNULL = "通道号不可为空";
        public final static String TAKEORDER_ISNULL = "拍照数量命令不可为空";
        public final static String RESOLUTION_ISNULL = "分辨率不可为空";

    }
}
